package com.smartthinking.CICPNL;


import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class DatabaseTables {
	public static final String TABLE_BANNERS= "banners";
	public static final String TABLE_BANCAT = "banners_catalogo";
	public static final String TABLE_CALIF = "calificacion";
	public static final String TABLE_CAT = "categorias";
	public static final String TABLE_CMEX = "cintermex";
	public static final String TABLE_CMEX360 = "cintermex_360";
	public static final String TABLE_CMEXFOTO = "cintermex_fotos";
	public static final String TABLE_CMEXSALON = "cintermex_salones";
	public static final String TABLE_CMEXTEL = "cintermex_telefonos";
	public static final String TABLE_CUPON = "cupones";
	public static final String TABLE_CUPON_EMIT = "cupones_emitidos";
	public static final String TABLE_DESTINO = "destino";
	public static final String TABLE_DEST_FOTOS = "destino_fotos";
	public static final String TABLE_DEST_MSG = "destino_mensajes";
	public static final String TABLE_DEST_TEL = "destino_telefono";
	public static final String TABLE_ENCUESTA = "encuestas";
	public static final String TABLE_ENCUESTA_OP = "encuestas_opciones";
	public static final String TABLE_ENCUESTA_RESP = "encuestas_respuestas";
	public static final String TABLE_EVENTO = "eventos";
	public static final String TABLE_EVENTO_BANNER = "eventos_banners";
	public static final String TABLE_EVENTO_FOTO = "eventos_fotos";
	public static final String TABLE_EVENTO_PROV = "eventos_provedores";
	public static final String TABLE_EVENTO_SOC = "eventos_sociales";
	public static final String TABLE_EVENTO_USR = "eventos_usuarios";
	public static final String TABLE_EXPOSITOR = "expositores";
	public static final String TABLE_LANZ = "lanzamientos";
	public static final String TABLE_LANZ_FOTO = "lanzamientos_fotos";
	public static final String TABLE_NOTICIA = "noticias";
	public static final String TABLE_NOTICIA_FOTO = "noticias_fotos";
	public static final String TABLE_PATROCINADOR = "patrocinadores";
	public static final String TABLE_PATROCINADOR_EVENT = "patrocinadores_eventos";
	public static final String TABLE_PATROCINADOR_FOTO = "patrocinadores_fotos";
	public static final String TABLE_PERFIL_REG = "perfil_registro";
	public static final String TABLE_POIS = "pois";
	public static final String TABLE_POIS_CTE = "pois_clientes";
	public static final String TABLE_POIS_DOC = "pois_documentos";
	public static final String TABLE_POIS_FOTO = "pois_fotos";
	public static final String TABLE_PONENCIA = "ponencias";
	public static final String TABLE_PONENCIA_DOC = "ponencias_documentos";
	public static final String TABLE_PONENCIA_VAL = "ponencias_valoracion";
	public static final String TABLE_PONENTE = "ponentes";
	public static final String TABLE_PONENTE_PONENCIA = "ponentes_ponencias";
	public static final String TABLE_PUSH = "push";
	public static final String TABLE_SALON360 = "salones-360";
	public static final String TABLE_SECC_NOTICIA = "seccionesnoticias";
	public static final String TABLE_USUARIO = "usuarios";
	public static final String TABLE_USUARIO_SIST = "usuarios_sistema";
	public static final String TABLE_FAVORITOS = "favoritos";
	
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////	
		
	  
	private static final String DATABASE_CREATE_BANNER = "create table " + TABLE_BANNERS + 
		"(ban_idr integer NOT NULL, " +
		"ban_tipo character varying(255)," +
		"ban_url character varying(255)," +
		"ban_timer integer, " +
		"pat_idr integer, " +
		"ban_tamano character varying(255)," +
		"ban_destino_url character varying(255), " +
		"CONSTRAINT pkbanners PRIMARY KEY (ban_idr ));";

	
	private static final String DATABASE_CREATE_BANCAT = "create table " + TABLE_BANCAT + 
		"(ban_idr integer NOT NULL, " +
		"ban_nombre character varying(255)," +
		"ban_tamano character varying(255)," +
		"CONSTRAINT pkbannerscatalog PRIMARY KEY (ban_idr ));";
	
	
	private static final String DATABASE_CREATE_CALIF = "create table " + TABLE_CALIF + 
			"(tipo TEXT NOT NULL, idr INTEGER NOT NULL, calif INTEGER, comentario TEXT, enviado BOOL, PRIMARY KEY (tipo, idr));";
	
		
	private static final String DATABASE_CREATE_CAT = "create table " + TABLE_CAT + 
		"(cat_cve integer NOT NULL, " +
		"cat_des character varying(255)," +
		"cat_des_en character varying(255)," +
		"cat_ico character varying(255)," +
		"cat_orden integer," +
		"CONSTRAINT pkcategorias PRIMARY KEY (cat_cve ));";

	
	private static final String DATABASE_CREATE_CMEX = "create table " + TABLE_CMEX + 
		"(cint_idr integer NOT NULL, " +
		"cint_des text, " +
		"cint_dir1 character varying(255)," +
		"cint_dir2 character varying(255)," +
		"cint_dir3 character varying(255)," +
		"cint_dir4 character varying(255)," +
		"cint_tel character varying(255)," +
		"cint_fax character varying(255)," +
		"cint_mail character varying(255)," +
		"cint_facebook character varying(255)," +
		"cint_twitter character varying(255)," +
		"cint_youtube character varying(255)," +
		"cint_des_en text," +
		"cint_dir1_en character varying(255)," +
		"cint_dir2_en character varying(255)," +
		"cint_dir3_en character varying(255)," +
		"cint_dir4_en character varying(255)," +
		"cint_salones character varying(255)," +
		"CONSTRAINT pkcintermex PRIMARY KEY (cint_idr ));";

		
	private static final String DATABASE_CREATE_CMEX360 = "create table " + TABLE_CMEX360 + 
		"((c360_idr INTEGER, c360_desc CHARACTER VARYING(255), c360_desc_en CHARACTER VARYING(255), c360_url CHARACTER VARYING(255));";
	
	
	
	private static final String DATABASE_CREATE_CMEXFOTO = "create table " + TABLE_CMEXFOTO + 
		"(foto_idr integer NOT NULL, " + 
		"foto_url character varying(255)," +
		"CONSTRAINT pkfotoscintermex PRIMARY KEY (foto_idr ));";
	
	
	private static final String DATABASE_CREATE_CMEXSALON = "create table " + TABLE_CMEXSALON + 
		"(cint_idr integer NOT NULL, " +
		"cint_salon character varying(255), " +
		"cint_salon_en character varying(255)," +
		"cint_url character varying(255)," +
		"cint_area character varying(255)," +
		"cint_ancho character varying(255)," +
		"cint_largo character varying(255)," +
		"cint_altura character varying(255)," +
		"cint_capacidades text," +
		"cint_capacidades_en text," +
		"cint_area_pies integer," +
		"cint_tipo integer," +
		"CONSTRAINT pksalones PRIMARY KEY (cint_idr ));";

	
	
	
	private static final String DATABASE_CREATE_CMEXTEL = "create table " + TABLE_CMEXTEL + 
		"(cint_idr integer NOT NULL, " +
		"cint_tel character varying(255)," +
		"cint_mail character varying(255)," +
		"cint_area character varying(255)," +
		"cint_area_en character varying(255)," +
		"CONSTRAINT pkcintermexteles PRIMARY KEY (cint_idr ));";
	
	private static final String DATABASE_CREATE_CUPON = "create table " + TABLE_CUPON + 
		"(cup_idr integer NOT NULL, " +
		"eve_idr integer," +
		"cup_promocion character varying(255)," +
		"cup_restricciones character varying(255)," +
		"cup_vigencia character varying(255)," +
		"cup_url character varying(255)," +
		"poi_idr integer," +
		"cup_promocion_en character varying(255)," +
		"cup_restricciones_en character varying(255)," +
		"cup_vigencia_en character varying(255)," +
		"cup_ahorro numeric(13,2)," +
		"cup_mejoroferta integer," +
		"CONSTRAINT pk_cupones PRIMARY KEY (cup_idr ));";

	
	
	private static final String DATABASE_CREATE_CUPON_EMIT = "create table " + TABLE_CUPON_EMIT + 
		"(cup_idr integer NOT NULL, " +
		"eve_idr integer NOT NULL, " +
		"udid character varying(255) NOT NULL," +
		"cup_fecha timestamp without time zone," +
		"cup_enviado BOOL,"+
		"CONSTRAINT pkcuponesemitidos PRIMARY KEY (cup_idr , eve_idr , udid ));";
	
	private static final String DATABASE_CREATE_DESTINO = "create table " + TABLE_DESTINO + 
			"(eve_idr INTEGER PRIMARY KEY, dst_nombre CHARACTER VARYING(255), dst_estado CHARACTER VARYING(255), " +
			"dst_logo1 CHARACTER VARYING(255), dst_logo2 CHARACTER VARYING(255), dst_tel CHARACTER VARYING(255), " +
			"dst_mail CHARACTER VARYING(255), dst_www CHARACTER VARYING(255), dst_facebook CHARACTER VARYING(255), " +
			"dst_twitter CHARACTER VARYING(255), dst_youtube CHARACTER VARYING(255), dst_linkedin CHARACTER VARYING(255), dst_video CHARACTER VARYING(255));";
	
	private static final String DATABASE_CREATE_DEST_FOTOS = "create table " + TABLE_DEST_FOTOS + 
			"(eve_idr INTEGER, df_idr INTEGER, df_url CHARACTER VARYING(255));";
	
	
	private static final String DATABASE_CREATE_DEST_MSG = "create table " + TABLE_DEST_MSG + 
			"(eve_idr INTEGER, dm_idr INTEGER, dm_nombre CHARACTER VARYING(255), dm_cargo CHARACTER VARYING(255), " +
			"dm_cargo_en CHARACTER VARYING(255), dm_foto CHARACTER VARYING(255), dm_video CHARACTER VARYING(255), dm_documento CHARACTER VARYING(255));";
	
	private static final String DATABASE_CREATE_DEST_TEL = "create table " + TABLE_DEST_TEL + 
			"(eve_idr INTEGER, dt_idr INTEGER, dt_nombre CHARACTER VARYING(255), dt_numero CHARACTER VARYING(255));";
	
	private static final String DATABASE_CREATE_ENCUESTA = "create table " + TABLE_ENCUESTA + 
		"(enc_idr integer NOT NULL, " +
		"enc_descripcion character varying(255), " +
		"eve_idr integer," +
		"enc_descripcion_en character varying(255)," +
		"CONSTRAINT pkencuestas PRIMARY KEY (enc_idr ));";
	
	private static final String DATABASE_CREATE_ENCUESTA_OP = "create table " + TABLE_ENCUESTA_OP + 
		"(enc_idr integer NOT NULL, " +
		"opc_idr integer NOT NULL, " +
		"opc_texto character varying(255)," +
		"opc_texto_en character varying(255)," +
		"CONSTRAINT pkencuestasopciones PRIMARY KEY (enc_idr , opc_idr ));";
	
	private static final String DATABASE_CREATE_ENCUESTA_RESP = "create table " + TABLE_ENCUESTA_RESP + 
		"(enc_idr integer NOT NULL, " +
		"opc_idr integer NOT NULL," +
		"udid character varying(255) NOT NULL," +
		"enc_enviado BOOL," +
		"CONSTRAINT PKENCUESTASRESPUESTAS PRIMARY KEY (enc_idr , opc_idr , udid ));";
	
	private static final String DATABASE_CREATE_EVENTO = "create table " + TABLE_EVENTO + 
			"(eve_idr INTEGER PRIMARY KEY NOT NULL, eve_nombre CHARACTER VARYING(255), eve_descripcion TEXT, eve_poster CHARACTER VARYING(255), eve_fec_ini DATE, eve_fec_fin DATE, eve_plano CHARACTER VARYING(255), eve_lugar CHARACTER VARYING(255), eve_contacto CHARACTER VARYING(255), eve_mail CHARACTER VARYING(255), eve_tel CHARACTER VARYING(255), eve_facebook CHARACTER VARYING(255), eve_twitter CHARACTER VARYING(255), eve_youtube CHARACTER VARYING(255), eve_linkedin CHARACTER VARYING(255), eve_mail_preregistro CHARACTER VARYING(255), eve_www CHARACTER VARYING(255), eve_orden INTEGER, eve_nombre_en CHARACTER VARYING(255), eve_descripcion_en TEXT, eve_publicado INTEGER, eve_lugar_en CHARACTER VARYING, eve_proveedores CHARACTER VARYING(255), eve_hora_ini CHARACTER VARYING(10), eve_hora_fin CHARACTER VARYING(10), eve_video CHARACTER VARYING(255), eve_datos_org TEXT, eve_datos_org_en TEXT, eve_chat_url CHARACTER VARYING(255), eve_infogeneral CHARACTER VARYING(255));";

	
	private static final String DATABASE_CREATE_EVENTO_BANNER = "create table " + TABLE_EVENTO_BANNER + 
		"(eve_idr integer NOT NULL, " +
		"ban_idr integer NOT NULL, " +
		"ban_url character varying(255), " +
		"pat_idr integer, " +
		"ban_timer integer, " +
		"CONSTRAINT pkeventosbanners PRIMARY KEY (eve_idr , ban_idr ));";

	private static final String DATABASE_CREATE_EVENTO_FOTO = "create table " + TABLE_EVENTO_FOTO + 
		"(eve_idr integer NOT NULL, " +
		"foto_cons integer NOT NULL, " +
		"foto_url character varying(255), " +
		"CONSTRAINT pkeventos_fotos PRIMARY KEY (eve_idr , foto_cons ));";

	
	private static final String DATABASE_CREATE_EVENTO_PROV = "create table " + TABLE_EVENTO_PROV + 
			"(eve_idr INTEGER, prov_idr INTEGER, prov_logo CHARACTER VARYING(255));";

	
	private static final String DATABASE_CREATE_EVENTO_SOC = "create table " + TABLE_EVENTO_SOC + 
			"(evs_idr INTEGER, eve_idr INTEGER, evs_titulo CHARACTER VARYING(255), evs_titulo_en CHARACTER VARYING(255) PRIMARY KEY, " +
			"evs_descripcion CHARACTER VARYING(255), evs_descripcion_en CHARACTER VARYING(255), evs_fecha CHARACTER VARYING(255), " +
			"evs_inicio CHARACTER VARYING(255), evs_fin CHARACTER VARYING(255), evs_lugar CHARACTER VARYING(255), " +
			"evs_lugar_en CHARACTER VARYING(255), evs_contacto CHARACTER VARYING(255), evs_mail CHARACTER VARYING(255), " +
			"evs_tel CHARACTER VARYING(255), evs_lat CHARACTER VARYING(255), evs_lng CHARACTER VARYING(255), evs_tipo CHARACTER VARYING(255), " +
			"evs_tipo_en CHARACTER VARYING(255), evs_vest CHARACTER VARYING(255), evs_vest_en CHARACTER VARYING(255), evs_req CHARACTER VARYING(255), " +
			"evs_req_en CHARACTER VARYING(255), evs_foto CHARACTER VARYING(255), evs_patrocinador CHARACTER VARYING(255), evs_tipo_desc CHARACTER VARYING(255), " +
			"evs_tipo_desc_en CHARACTER VARYING(255), evs_vest_desc CHARACTER VARYING(255), evs_vest_desc_en CHARACTER VARYING(255), " +
			"evs_req_desc CHARACTER VARYING(255), evs_req_desc_en CHARACTER VARYING(255));";
	

	private static final String DATABASE_CREATE_EVENTO_USR = "create table " + TABLE_EVENTO_USR + 
		"(eve_idr integer NOT NULL, " +
		"udid character varying(255) NOT NULL, " +
		"CONSTRAINT pkeentosusuarios PRIMARY KEY (eve_idr , udid ));";
	
	private static final String DATABASE_CREATE_EXPO = "create table " + TABLE_EXPOSITOR + 
		"(exp_idr integer NOT NULL, " +
		"exp_nombre character varying(255)," +
		"exp_mail character varying(255)," +
		"eve_idr integer," +
		"exp_www character varying(255)," +
		"exp_logo character varying(255)," +
		"exp_facebook character varying(255)," +
		"exp_twitter character varying(255)," +
		"exp_youtube character varying(255)," +
		"exp_linkedin character varying(255)," +
		"exp_stand character varying(255)," +
		"exp_descripcion text," +
		"exp_tel character varying(255)," +
		"exp_descripcion_en text," +
		"exp_croquis_x integer," +
		"exp_croquis_y integer, exp_contacto CHARACTER VARYING(255), exp_categoria CHARACTER VARYING(255), exp_categoria_en CHARACTER VARYING(255), exp_lat CHARACTER VARYING(255), exp_lng CHARACTER VARYING(255)," +
		"CONSTRAINT pkexpositores PRIMARY KEY (exp_idr ));";

	private static final String DATABASE_CREATE_LANZ = "create table " + TABLE_LANZ + 
			"(eve_idr INTEGER, lan_idr INTEGER, lan_titulo CHARACTER VARYING(255), lan_titulo_en CHARACTER VARYING(255), " +
			"lan_desc TEXT, lan_desc_en TEXT, lan_video CHARACTER VARYING(255), lan_twitter CHARACTER VARYING(255), " +
			"lan_facebook CHARACTER VARYING(255), lan_youtube CHARACTER VARYING(255), lan_linkedin CHARACTER VARYING(255), " +
			"lan_www CHARACTER VARYING(255), lan_foto CHARACTER VARYING(255));";
	
	private static final String DATABASE_CREATE_LANZ_FOTO = "create table " + TABLE_LANZ_FOTO + 
			"(lan_idr INTEGER, foto_cons INTEGER, foto_url CHARACTER VARYING(255));";
	
	private static final String DATABASE_CREATE_NOTICIA = "create table " + TABLE_NOTICIA + 
			"(not_idr integer NOT NULL, " +
			"not_fecha timestamp with time zone, " +
			"sec_idr integer," +
			"not_titulo character varying(255)," +
			"not_descripcion text," +
			"not_thumb character varying(255)," +
			"not_titulo_en character varying(255)," +
			"not_descripcion_en text," +
			"not_prioridad integer," +
			"CONSTRAINT pknoticias PRIMARY KEY (not_idr ));";
	
	
	private static final String DATABASE_CREATE_NOTICIA_FOTO = "create table " + TABLE_NOTICIA_FOTO + 
			"(not_idr integer NOT NULL, " +
			"foto_idr integer NOT NULL, " +
			"foto_url character varying(255)," +
			"CONSTRAINT pknoticiasfotos PRIMARY KEY (not_idr , foto_idr ));";
	
	
	private static final String DATABASE_CREATE_PATROCINADOR = "create table " + TABLE_PATROCINADOR + 
			"(pat_idr integer NOT NULL, " +
			"pat_nombre character varying(255)," +
			"pat_des text," +
			"pat_tel character varying(255)," +
			"pat_mail character varying(255)," +
			"pat_www character varying(255)," +
			"pat_facebook character varying(255)," +
			"pat_twitter character varying(255)," +
			"pat_youtube character varying(255)," +
			"pat_linkedin character varying(255)," +
			"pat_logo character varying(255)," +
			"pat_des_en text," +
			"pat_patrocinter integer," +
			"pat_video character varying(255), pat_cat CHARACTER VARYING(255), pat_categoria CHARACTER VARYING(255), pat_contacto CHARACTER VARYING(255), pat_categoria_en CHARACTER VARYING(255), pat_stand CHARACTER VARYING(255)," +
			"CONSTRAINT pkpatrocinadores PRIMARY KEY (pat_idr ));";
			
	
	private static final String DATABASE_CREATE_PATROCINADOR_EVENT = "create table " + TABLE_PATROCINADOR_EVENT + 
			"(pat_idr integer NOT NULL, " +
			"eve_idr integer NOT NULL, " +
			"CONSTRAINT PKPATROCINADORESEVENTOS PRIMARY KEY (pat_idr , eve_idr ));";		
	
	private static final String DATABASE_CREATE_PATROCINADOR_FOTO = "create table " + TABLE_PATROCINADOR_FOTO + 
		"(pat_idr integer NOT NULL, " +
		"foto_cons integer NOT NULL," +
		"foto_url character varying(255)," +
		"CONSTRAINT pkpats_fotos PRIMARY KEY (pat_idr , foto_cons ));";	
	
	
	
	private static final String DATABASE_CREATE_PERFIL_REG = "create table " + TABLE_PERFIL_REG + 
			"(eve_idr INTEGER, per_idr CHARACTER VARYING(255), per_nombre CHARACTER VARYING(255), per_nombre_en CHARACTER VARYING(255));";	
		
	
	private static final String DATABASE_CREATE_POIS = "create table " + TABLE_POIS + 
		"(poi_idr integer NOT NULL, " +
		"poi_nombre character varying(255), " +
		"poi_lat numeric(13,5)," +
		"poi_lng numeric(13,5)," +
		"poi_direccion character varying(255)," +
		"poi_colonia character varying(255)," +
		"poi_municipio character varying(255)," +
		"poi_cp character varying(5)," +
		"poi_telefono character varying(255)," +
		"poi_mail character varying(255)," +
		"poi_www character varying(255)," +
		"cat_cve integer," +
		"poi_thumb character varying(255)," +
		"poi_horarios character varying(100)," +
		"poi_facebook character varying(255)," +
		"poi_twitter character varying(255)," +
		"poi_clientes character varying(255)," +
		"poi_vip integer," +
		"poi_desc text," +
		"poi_desc_en text," +
		"CONSTRAINT pkpois PRIMARY KEY (poi_idr ));";	
		
	
	
	private static final String DATABASE_CREATE_POIS_CTE = "create table " + TABLE_POIS_CTE + 
		"(poi_idr integer NOT NULL, " +
		"cli_cons integer NOT NULL," +
		"cli_url character varying(255)," +
		"CONSTRAINT pkpoisclie PRIMARY KEY (poi_idr , cli_cons ));";	
		
	
	
	private static final String DATABASE_CREATE_POIS_DOC = "create table " + TABLE_POIS_DOC + 
		"(poi_idr integer NOT NULL, " +
		"doc_cons integer NOT NULL," +
		"doc_url character varying(255)," +
		"doc_nombre character varying(255)," +
		"CONSTRAINT pkdocs PRIMARY KEY (poi_idr , doc_cons ));";	

	private static final String DATABASE_CREATE_POIS_FOTO = "create table " + TABLE_POIS_FOTO + 
		"(poi_idr integer NOT NULL, " +
		"foto_cons integer NOT NULL, " +
		"foto_url character varying(255)," +
		"foto_tipo character varying(255)," +
		"CONSTRAINT pkpoisfotos PRIMARY KEY (poi_idr , foto_cons ));";	
	
	
	private static final String DATABASE_CREATE_PONENCIA = "create table " + TABLE_PONENCIA + 
			"(nen_idr INTEGER PRIMARY KEY NOT NULL, eve_idr INTEGER, nen_titulo CHARACTER VARYING(255), nen_descripcion TEXT, nen_inicio CHARACTER VARYING(5), nen_fin CHARACTER VARYING(5), nen_lugar CHARACTER VARYING(255), nen_cupo INTEGER, nen_registrados INTEGER, nen_precio CHARACTER VARYING(255), nen_fecha DATE, nen_titulo_en CHARACTER VARYING(255), nen_descripcion_en CHARACTER VARYING(255), nen_lugar_en CHARACTER VARYING(255), nen_ponente CHARACTER VARYING(255), nen_especialidad CHARACTER VARYING(255), nen_especialidad_en CHARACTER VARYING(255), nen_institucion CHARACTER VARYING(255), nen_foto CHARACTER VARYING(255), nen_patrocinios CHARACTER VARYING(255));";	
	
	private static final String DATABASE_CREATE_PONENCIA_DOC = "create table " + TABLE_PONENCIA_DOC + 
			"(nen_idr integer NOT NULL, " +
			"doc_cons integer NOT NULL," +
			"doc_url character varying(255)," +
			"doc_nombre character varying," +
			"doc_nombre_en character varying(255)," +
			"CONSTRAINT pkponencia_docs PRIMARY KEY (nen_idr , doc_cons ));";	

	
	private static final String DATABASE_CREATE_PONENCIA_VAL = "create table " + TABLE_PONENCIA_VAL + 
		"(nen_idr integer NOT NULL, " +
		"udid character varying(255) NOT NULL," +
		"nen_valoracion integer," +
		"CONSTRAINT pkvaloracionponencia PRIMARY KEY (nen_idr , udid ));";	

	private static final String DATABASE_CREATE_PONENTE = "create table " + TABLE_PONENTE + 
		"(pon_idr integer NOT NULL, " +
		"pon_nombre character varying(255), " +
		"pon_paterno character varying(255)," +
		"pon_materno character varying(255)," +
		"pon_empresa character varying(255)," +
		"pon_mail character varying(255)," +
		"pon_fb character varying(255)," +
		"pon_tw character varying(255)," +
		"pon_li character varying(255)," +
		"eve_idr integer," +
		"pon_titulo character varying(255)," +
		"pon_puesto character varying(255)," +
		"pon_yb character varying(255)," +
		"pon_foto character varying(255)," +
		"pon_perfil text," +
		"pon_perfil_en text," +
		"pon_desc text," +
		"pon_desc_en text, pon_www CHARACTER VARYING(255), pon_tel CHARACTER VARYING(255)," +
		"CONSTRAINT pkponentes PRIMARY KEY (pon_idr ));";

	
	
	private static final String DATABASE_CREATE_PONENTE_PON = "create table " + TABLE_PONENTE_PONENCIA + 
		"(pon_idr integer NOT NULL, " +
		"nen_idr integer NOT NULL, " +
		"CONSTRAINT pkponenciasponentes PRIMARY KEY (pon_idr , nen_idr ));";

	
	private static final String DATABASE_CREATE_PUSH = "create table " + TABLE_PUSH + 
		"(push_idr integer NOT NULL, " +
		"push_text character varying(255), " +
		"push_fecha timestamp without time zone," +
		"eve_idr integer," +
		"CONSTRAINT pkpush PRIMARY KEY (push_idr ));";

	
	private static final String DATABASE_CREATE_SALON360 = "create table " + TABLE_SALON360 + 
		"(cint_idr integer NOT NULL, " +
		"c360_idr integer NOT NULL, " +
		"CONSTRAINT pksalones_360 PRIMARY KEY (cint_idr , c360_idr ));";
		

	private static final String DATABASE_CREATE_SECC_NOTICIA = "create table " + TABLE_SECC_NOTICIA + 
		"(sec_idr integer NOT NULL, " +
		"sec_nombre character varying(255), " +
		"sec_orden integer, " +
		"eve_idr integer, " +
		"sec_nombre_en character varying(255), " +
		"CONSTRAINT pkseccionesnoticias PRIMARY KEY (sec_idr ));";
			

	private static final String DATABASE_CREATE_USUARIO = "create table " + TABLE_USUARIO + 
		"(usu_idr integer NOT NULL, " +
		"usu_udid character varying(100)," +
		"usu_token character varying(100)," +
		"usu_model character varying(255)," +
		"usu_osversion character varying(50)," +
		"usu_appversion character varying(50)," +
		"usu_fecha timestamp with time zone," +
		"CONSTRAINT pkuser PRIMARY KEY (usu_idr ));";
	
	
	private static final String DATABASE_CREATE_USUARIO_SIST = "create table " + TABLE_USUARIO_SIST + 
		"(idusuario integer NOT NULL, " +
		"nombre character varying(255), " +
		"password character varying(255)," +
		"administrador integer," +
		"CONSTRAINT pkusuarios PRIMARY KEY (idusuario ));";
	
	private static final String DATABASE_CREATE_FAVORITOS = "create table " + TABLE_FAVORITOS + 
			"(idr INTEGER NOT NULL, tipo TEXT NOT NULL, CONSTRAINT pkfavoritos PRIMARY KEY (idr , tipo ));";
			

    public static void onCreate(SQLiteDatabase db) {
    	db.execSQL(DATABASE_CREATE_BANNER);
    	db.execSQL(DATABASE_CREATE_BANCAT);
    	db.execSQL(DATABASE_CREATE_CALIF);
    	db.execSQL(DATABASE_CREATE_CAT);
//    	db.execSQL(DATABASE_CREATE_CMEX);
//    	db.execSQL(DATABASE_CREATE_CMEX360);
//    	db.execSQL(DATABASE_CREATE_CMEXFOTO);
//    	db.execSQL(DATABASE_CREATE_CMEXSALON);
//    	db.execSQL(DATABASE_CREATE_CMEXTEL);
    	db.execSQL(DATABASE_CREATE_CUPON);
    	db.execSQL(DATABASE_CREATE_CUPON_EMIT);
    	db.execSQL(DATABASE_CREATE_DESTINO);
    	db.execSQL(DATABASE_CREATE_DEST_FOTOS);
    	db.execSQL(DATABASE_CREATE_DEST_MSG);
    	db.execSQL(DATABASE_CREATE_DEST_TEL);
    	db.execSQL(DATABASE_CREATE_ENCUESTA);
    	db.execSQL(DATABASE_CREATE_ENCUESTA_OP);
    	db.execSQL(DATABASE_CREATE_ENCUESTA_RESP);
    	db.execSQL(DATABASE_CREATE_EVENTO);
    	db.execSQL(DATABASE_CREATE_EVENTO_BANNER);
    	db.execSQL(DATABASE_CREATE_EVENTO_FOTO);
//    	db.execSQL(DATABASE_CREATE_EVENTO_PROV);
    	db.execSQL(DATABASE_CREATE_EVENTO_SOC);
//    	db.execSQL(DATABASE_CREATE_EVENTO_USR);
    	db.execSQL(DATABASE_CREATE_EXPO);
    	db.execSQL(DATABASE_CREATE_LANZ);
    	db.execSQL(DATABASE_CREATE_LANZ_FOTO);
    	db.execSQL(DATABASE_CREATE_NOTICIA);
    	db.execSQL(DATABASE_CREATE_NOTICIA_FOTO);
    	db.execSQL(DATABASE_CREATE_PATROCINADOR);
    	db.execSQL(DATABASE_CREATE_PATROCINADOR_EVENT);
    	db.execSQL(DATABASE_CREATE_PATROCINADOR_FOTO);
    	db.execSQL(DATABASE_CREATE_PERFIL_REG);
    	db.execSQL(DATABASE_CREATE_POIS);
//    	db.execSQL(DATABASE_CREATE_POIS_CTE);
//    	db.execSQL(DATABASE_CREATE_POIS_DOC);
//    	db.execSQL(DATABASE_CREATE_POIS_FOTO);
    	db.execSQL(DATABASE_CREATE_PONENCIA);
//    	db.execSQL(DATABASE_CREATE_PONENCIA_DOC);
//    	db.execSQL(DATABASE_CREATE_PONENCIA_VAL);
    	db.execSQL(DATABASE_CREATE_PONENTE);
    	db.execSQL(DATABASE_CREATE_PONENTE_PON);
    	db.execSQL(DATABASE_CREATE_PUSH);
//    	db.execSQL(DATABASE_CREATE_SALON360);
    	db.execSQL(DATABASE_CREATE_SECC_NOTICIA);
//    	db.execSQL(DATABASE_CREATE_USUARIO);
//    	db.execSQL(DATABASE_CREATE_USUARIO_SIST);
    	db.execSQL(DATABASE_CREATE_FAVORITOS);
    	
    	
    }


	public static void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
	    Log.w(DatabaseTables.class.getName(), "Upgrading database from version " + oldVersion + " to " + newVersion + ", which will destroy all old data");
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_BANNERS);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_BANCAT);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CALIF);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CAT);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CMEX);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CMEX360);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CMEXFOTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CMEXSALON);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CMEXTEL);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CUPON);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_CUPON_EMIT);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_DESTINO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_DEST_FOTOS);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_DEST_MSG);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_DEST_TEL);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_ENCUESTA);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_ENCUESTA_OP);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_ENCUESTA_RESP);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EVENTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EVENTO_BANNER);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EVENTO_FOTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EVENTO_PROV);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EVENTO_SOC);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EVENTO_USR);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_EXPOSITOR);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_LANZ);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_LANZ_FOTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_NOTICIA);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_NOTICIA_FOTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PATROCINADOR);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PATROCINADOR_EVENT);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PATROCINADOR_FOTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PERFIL_REG);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_POIS);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_POIS_CTE);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_POIS_DOC);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_POIS_FOTO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PONENCIA);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PONENCIA_DOC);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PONENCIA_VAL);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PONENTE);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PONENTE_PONENCIA);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_PUSH);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_SALON360);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_SECC_NOTICIA);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_USUARIO);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_USUARIO_SIST);
	        database.execSQL("DROP TABLE IF EXISTS " + TABLE_FAVORITOS);
	        onCreate(database);
	}
}

